import java.util.Scanner;

public class TEST {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		//int avoided as it would need parsing
		String a;
		while (s.hasNext() && (!(a = s.next()).startsWith("42"))) {
			System.out.println(a);
		}
	s.close();
	}
}
